import Main from '@/view/main'

export default [
  {
    path: '/login',
    name: 'login',
    meta: {
      title: '登录',
      hideInMenu: true
    },
    component: () => import('@/view/login/login.vue')
  },
  {
    path: '/',
    name: '_home',
    redirect: '/home',
    meta: {
      icon: 'logo-buffer',
      title: '概况',
      notCache: true,
      showAlways:true
    },
    component: Main,
    children: [
      {
        path: '/home',
        name: 'home',
        meta: {
          icon: '_qq',
          notCache: true,
          title: '基本概况'
        },
        component: () => import('@/view/desktop/home')
      }
    ]
  },
  {
    path: '/user-analysis',
    name: 'user-analysis',
    meta: {
      icon: 'logo-buffer',
      title: '用户分析'
    },
    component: Main,
    children: [
      {
        path: 'new-user',
        name: 'user-analysis-new-user',
        meta: {
          icon: 'md-trending-up',
          title: '新增用户'
        },
        component: () => import('@/view/user-analysis/new-user')
      },
      {
        path: 'active-user',
        name: 'user-analysis-active-user',
        meta: {
          icon: 'ios-infinite',
          title: '活跃用户'
        },
        component: () => import('@/view/user-analysis/active-user')
      },
      {
        path: 'page-count',
        name: 'user-analysis-page-count',
        meta: {
          icon: 'md-grid',
          title: '启动次数'
        },
        component: () => import('@/view/user-analysis/page-count')
      }
    ]
  },
  {
    path: '/user-compose',
    name: 'user-compose',
    meta: {
      icon: 'md-cloud-upload',
      title: '用户构成'
    },
    component: Main,
    children: [
      {
        path: 'user',
        name: 'user-compose-user',
        meta: {
          icon: 'ios-document',
          title: '用户构成分析'
        },
        component: () => import('@/view/user-compose/user.vue')
      },
      {
        path: 'transformation',
        name: 'user-compose-transformation',
        meta: {
          icon: 'md-clipboard',
          title: '用户成分转化'
        },
        component: () => import('@/view/user-compose/transformation.vue')
      }
    ]
  },
  {
    path: '/remain',
    name: 'remain',
    meta: {
      icon: 'ios-stats',
      title: '留存分析'
    },
    component: Main,
    children: [
      {
        path: 'user',
        name: 'remain-user',
        meta: {
          icon: 'md-add',
          title: '留存用户'
        },
        component: () => import('@/view/remain/user.vue')
      },
      {
        path: 'freshness',
        name: 'freshness',
        meta: {
          icon: 'md-download',
          title: '用户新鲜度'
        },
        component: () => import('@/view/remain/freshness.vue')
      },
      {
        path: 'active',
        name: 'remain-active',
        meta: {
          icon: 'md-download',
          title: '用户活跃度'
        },
        component: () => import('@/view/remain/active.vue')
      }
    ]
  },
  {
    path: '/channel',
    name: 'channel',
    meta: {
      icon: 'ios-stats',
      title: '渠道分析',
      showAlways:true
    },
    component: Main,
    children: [
      {
        path: 'index',
        name: 'channel_index',
        meta: {
          icon: 'md-add',
          title: '渠道列表'
        },
        component: () => import('@/view/channel/list.vue')
      }    
    ]
  },
  {
    path: '/401',
    name: 'error_401',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/401.vue')
  },
  {
    path: '/500',
    name: 'error_500',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/500.vue')
  },
  {
    path: '*',
    name: 'error_404',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/404.vue')
  }
]
